//
//  PersonNavView.m
//  diaoyuren
//
//  Created by 钓鱼人 on 16/1/5.
//  Copyright © 2016年 game. All rights reserved.
//

#import "PersonNavView.h"
#import "LoginController.h"
@implementation PersonNavView
-(instancetype) initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        
         [UIApplication sharedApplication].statusBarStyle = 0;
        self.backgroundColor = [UIColor whiteColor];
        UIButton *bnt = [UIButton buttonWithType:UIButtonTypeCustom];
        bnt.frame = CGRectMake(0, 0, 120, 64);
        bnt.imageEdgeInsets = UIEdgeInsetsMake(20, 13, 0, 0);
        [bnt setImage:[UIImage imageNamed:@"btn-return"] forState:UIControlStateNormal];
        [bnt addTarget:self action:@selector(back) forControlEvents:UIControlEventTouchUpInside];
        [bnt setTitle:@"BottonButton" forState:UIControlStateNormal];
        [bnt setTitleColor:[UIColor clearColor] forState:UIControlStateNormal];
        [self addSubview:bnt];
        
        _title = [[MBLabelWithFontAdapter alloc]initWithFrame:CGRectMake((SCREEN_WIDTH-100)/2, 20, 100, 44)];
        _title.font = [UIFont systemFontOfSize:18];
        _title.textAlignment = NSTextAlignmentCenter;
        [self addSubview:_title];
        
        UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, H(self)-1, SCREEN_WIDTH, 1)];
        view.backgroundColor= RGBA(223, 223, 223, 1);
        [self addSubview:view];
    }
    return self;
}

-(void)back{
   
    if (_BackToFatherView) {
        _BackToFatherView();
    }
    
}

@end